<template>
  <div>
    <ul class="mui-table-view myHotSongs">
      <li class="mui-table-view-cell mui-media" v-for="item in newList" :key="item.index">
        <router-link :to="'/playsongs/' + item.song_id" class="myTitle">
          <img class="mui-media-object mui-pull-left" :src="item.pic_small" />
          <div class="mui-media-body">
            {{item.album_title}}
            <p class="mui-ellipsis">{{item.artist_name}}</p>
          </div>
        </router-link>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {
      newList: []
    };
  },
   props:{
    title:String,
    type:String,
    //size:String
  },
  created() {
    this.getNew();
  },
  methods: {
    getNew() {
      const newURL =
        this.HOST +
        `/v1/restserver/ting?method=baidu.ting.billboard.billList&type=${this.type}`;
      this.$axios
        .get(newURL)
        .then(res => {
          //console.log(res.data)
          this.newList = res.data.song_list;
        })
        .catch();
    }
  }
};
</script>
<style lang="" scoped>
.mui-card {
    margin: 0;
}
</style>